import request from '@/utils/request'

export function getDepartment () {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

export function getManagerList () {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}

export function addDepartment (data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

export function getDepartmentDeatil (id) {
  return request({
    url: '/company/department/' + id,
    method: 'GET'
  })
}

export function updateDepartment (data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}

export function delDepartment (id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}
